import http from "@/utils/http";
// 获取组织架构数据
export function getTree() {
    return http({
        url:'/company/department',
    })
}
// 添加部门
export function adddepartmentsAPI(data){
    return http({
        url:"/company/department",
        method:'POST',
        data
    })
}
// 编辑部门
export function editdepartmentsAPI(data){
    return http({
        url:`/company/department/${data.id}`,
        method:'PUT',
        data
    })
}
// 删除部门
export function deletedepartmentsAPI(id){
    return http({
        url:`/company/department/${id}`,
        method:'DELETE'
    })
}